<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var gas_number = prompt("请输入汽油编号");
        var gas_l = prompt("请输入你要加多少升");
        if (gas_number == "92") {
            if (gas_l >= 20) {
                document.write('汽油5.9元一升' + '<br/>');
                document.write('共计' + 5.9 * gas_l);
            } else {
                document.write('汽油6.0元一升' + '<br/>');
                document.write('共计' + 6.0 * gas_l);
            }
        } else if (gas_number == "97") {
            if (gas_l >= 20) {
                document.write('汽油6.5元一升' + '<br/>');
                document.write('共计' + 6.5 * gas_l);
            } else {
                document.write('汽油7.0元一升' + '<br/>');
                document.write('共计' + 7.0 * gas_l);
            }
        }
    </script>
</body>

</html>